
#include <Probability.h>

Probability::Probability(double probability)
:
m_probability(probability)
{
}

double Probability::operator~() const
{
    return 1 - m_probability;
}

double Probability::operator&(const Probability &prob) const
{
    return m_probability * prob.m_probability;
}

double Probability::operator|(const Probability &prob) const
{
    return m_probability + prob.m_probability - m_probability * prob.m_probability;
}

